/*
 * @Author: your name
 * @Date: 2020-07-27 23:01:43
 * @LastEditTime: 2021-08-01 21:48:50
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \react-hooks-app\src\compontent\useEffectDemo.js
 */

import React,{useState,useEffect,useRef} from 'react'

  const UseEffectDemo=(props)=>{

    //挂载后 更新后
    useEffect(()=>{
      //reding 后   且 demoCount 改变后 执行
      console.log('UseEffectDemo useEffect...')
    },[props.demoCount])

    console.log('UseEffectDemo reding...')
    return (
      <div>111{props.demoCount}</div>
    );
  }

  export default  UseEffectDemo
